import { _decorator } from 'cc';
import { ecs } from 'db://app-game/libs/ecs/ECS';
import { CCComp } from 'db://app-game/module/common/CCComp';
import { StaticCreature } from '../StaticCreature';

const { ccclass } = _decorator;
@ccclass('StaticCreatureViewComp')
@ecs.register('StaticCreatureView', false)
export class StaticCreatureViewComp extends CCComp {
  /** 静态物品实例 */
  staticCreature: StaticCreature;
  protected onLoad(): void {
    this.staticCreature = this.ent as StaticCreature;
  }
  reset(ent: ecs.Entity): void {
    // 销毁自身节点
    this.node.destroy();
  }
}
